package com.site.dao;

import com.site.pojo.Receive;
import com.site.vo.ReceiveVO;

import java.sql.Connection;
import java.util.List;

/**
 * 入库表类Dao层
 */
public interface ReceiveDao {
    //查询所有
    List<Receive> selectAll();

    //多表：查询入库单及操作人员
    ReceiveVO selectByid(Long id,Long eid);

    //按id查询
    Receive selectByid(Long id);

    //按入库编号查询
    Receive selectByReceiveNumber(String receiveNumber);

    //新增入库单
    int addReceive(Receive receive);

    //通过id删除入库单
    int delReceiveByid(Long id);

    //通过入库编号删除入库单
    int delReceiveByReceiveNumber(String receiveNumber);

    //通过receive.id修改入库单
    int updateReceive(Receive receive);

    //[事务：]
    //新增入库单
    int addReceive(Connection conn, Receive receive);

    //通过id删除入库单
    int delReceiveByid(Connection conn,Long id);

    //通过入库编号删除入库单
    int delReceiveByReceiveNumber(Connection conn,String receiveNumber);

    //通过receive.id修改入库单
    int updateReceive(Connection conn,Receive receive);
}
